package Compation;

public class checkOverlap {
    public boolean checkOverlap(int radius, int x_center, int y_center, int x1, int y1, int x2, int y2) {
        double squareCenterX = (x1 + x2) / 2.0;
        double squareCenterY = (y1 + y2) / 2.0;
        double uX = Math.abs(x_center - squareCenterX);
        double uY = Math.abs(y_center - squareCenterY);
        return uX*uX + uY*uY <= radius*radius;
    }
}
